﻿ 
 var hdnReplaceTextString = $("#hdnReplace").val();
 
 $(function () {

            //TopBar 
            $("#link_OrderSummary").addClass("current");
            $("#link_Signup, #link_Availability, #link_Extras, #link_Configuration").addClass("completed");

             $(".Topstate li").each(function (index) {
        if($(this).hasClass('completed'))
        {
        var strhref=$(this).attr('id').split('_')[1];
        var strshowtext=$(this).text();
        var makehref = hdnReplaceTextString;
        var afterreplace= makehref.replace("ReplaceText",strhref);
        $(this).html("<a href="+afterreplace+">"+strshowtext+"</a>");
        }

        });

         var calTotal = 0;
        //for each loop to calculate for the total monthy price.
        $(".calculateMonthTotal").each(function (index) {
            calTotal += parseFloat($(this).text());
            $("#spntotalMonth").text(calTotal);
        });
      });


          $("#btnback").live("click", function (e) {
              $("#loaderCenter").show();
              $('#screen').css({ 'display': 'block', opacity: 0.3, 'width': $(document).width(), 'height': $(document).height() });
          });
          
           $("#btnnext").live("click", function (e) {
               $("#loaderCenter").show();
               $('#screen').css({ 'display': 'block', opacity: 0.3, 'width': $(document).width(), 'height': $(document).height() });
          });